import React from 'react';
import {
  HashRouter as Router,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom';
import NotFound from './components/pages/NotFound';
import Login from './components/pages/Login';
import App from './App';
import HookDemo from './components/Demo/HookDome';
import 'antd/dist/antd.css';

export default () => (
  <Router>
    <Switch>
      <Route
        exact
        path="/"
        render={() => <Redirect to="/app/dashboard" push />}
      ></Route>
      <Route path="/app" component={App}></Route>
      <Route path="/hook" component={HookDemo}></Route>
      <Route path="/404" component={NotFound}></Route>
      <Route path="/login" component={Login}></Route>
      <Route component={NotFound} />
    </Switch>
  </Router>
);
